package com.xuhai.blog19.api;

import com.xuhai.blog19.admin.service.CategoryService;
import com.xuhai.blog19.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author PangJunjie
 * @Date 2023/2/10/010
 */
@RestController
@RequestMapping("/api/category")
public class ApiCategoryController {

    @Autowired
    private CategoryService categoryService;

    @GetMapping("/list")
    public R list() {
        return R.ok().data(categoryService.getSelect());
    }
}
